import React, { PureComponent, Link,Route} from 'react'
import * as styles from "./home.less";
import { getHttp } from '@/utils/http.js'
import  Number  from './component/count'
import { useHistory } from "react-router-dom";

const Home=(props)=>{
    let history = useHistory();

    function handleClick(){
        history.push("/mine");
    }
    
    function getChildValue(value){
        console.log( '嗨，我是子组件的值'+value );
    }   

    return (
        <div>
            <div className={styles.content}>
                测试文字123
                <div onClick={()=>{handleClick()}}>MIne</div>
                <div onClick={()=>{history.push("/mine?id=123")}}>MIne嘎嘎嘎嘎嘎</div>
                <Number  name='你好呀，来吧~'  getChild = { getChildValue }  />
             </div>
        </div>
    )
}

export default Home